package com.company.基础.赋值;

public class ValueTransferTest {
    public static void main(String[] args) {
        System.out.println("****************基本类型赋值***************");
            int a=10;
            int b=a;
        System.out.println("a:"+a+", b:"+b);
        System.out.println("****************引用类型***************");
        Order order = new Order();
        order.setOrderId("aa");
        String orderId = order.getOrderId();
        Order order1=order;
        String orderId1 = order1.getOrderId();
        System.out.println("order:"+orderId+"  order1:"+orderId1);

    }
    static class Order {
        Order(){

        }
        String orderId;
        public void setOrderId(String orderId){
             this.orderId=orderId;
        }

        public String getOrderId(){
            return this.orderId;
        }
    }
}
